package com.fjeld.server.store;

import com.fjeld.middleware.jaxb.V1Node;

import javax.jms.JMSException;
import java.net.URL;

import org.apache.log4j.PropertyConfigurator;

/**
 * Created by IntelliJ IDEA.
 * User: fjelds
 * Date: Feb 26, 2010
 * Time: 10:58:22 PM
 *
 * Starts up and shuts down a storage manager.
 */
public class StorageServer
{

    public static void main(String[] args) throws ClassNotFoundException, JMSException
    {
        configureLogger();

        StorageManager storageManager = new StorageManager(V1Node.class.getSimpleName());
    }

    private static void configureLogger()
    {
        ClassLoader loader = StorageServer.class.getClassLoader();

        String log4jPropertiesFilename = "/com/log4j.properties";

        if (loader != null)
        {
            URL propertiesFile = StorageServer.class.getResource(log4jPropertiesFilename);
            PropertyConfigurator.configure(propertiesFile);
        }
    }

}
